//auto gen by paipai.java.augogen ver 143
//author floatman
#ifndef _EMPLOYEEAO_EMPLOYEE_H_
#define _EMPLOYEEAO_EMPLOYEE_H_

#include <stdint.h>
#include <string>
#include <iostream>
#include "app_platform/help_macros.h"
#include "app_platform/intf_service.h"
#include "intf_employeeao.h"

#include "library/basic/singleton_t.h"
#include "library/basic/sync_lock.h"
#include "c2cent/library/log/CWTimeElf3.h"

#include <map>
#include "erp/employee/po/employeepo_employee.h"
#include "erp/employee/po/employeefilterpo_employee.h"

HEADER_SELF_DEFINE_START
/**
*  请在这里增加自定义包含的头文件，否则无法合并代码
**/
using namespace c2cent::library::wtimeelf;
HEADER_SELF_DEFINE_END

namespace erp
{
namespace employee
{
namespace ao
{

#define EMPLOYEEAO_SERVICE_VERSION "ERP_EMPLOYEE_AO___EMPLOYEEAO__SERVICE_VERSION__1.0 2013-10-18 14:07:59"
const std::string EMPLOYEEAO_SERVICE_NOUSE = EMPLOYEEAO_SERVICE_VERSION;

SERVICE class CEmployeeAo : public IEmployeeAo{
public:
		CEmployeeAo(enum DeployMethod method = DEPLOY_STANDALONE);
		~CEmployeeAo();
		 void Reset();
		static int Initialize(IUserDefineCntl* pCntl = NULL);

public:
	 /**
	 *
	 *    根据ID获取员工信息
	 *
	 */
	EXPORT(0xC0011801) uint32_t GetEmployeeById(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::employee::po::CEmployeeFilterPo& oEmployeeFilter,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint32_t,erp::employee::po::CEmployeePo> & mapEmployees,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    写入员工信息
	 *
	 */
	EXPORT(0xC0011802) uint32_t AddEmployee(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::employee::po::CEmployeePo& oEmployee,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 erp::employee::po::CEmployeePo& oEmployeeBack,
		 std::string& strOutReserve
		);

SECTION_SELF_DEFINE_START
/**
* 请在这里增加自定义的成员变量和函数，否则无法合并代码
**/
private:
	int32_t CheckCommPara();
	int32_t CheckEmployeeFilter(const erp::employee::po::CEmployeeFilterPo& oEmployeeFilter);
	int32_t CheckEmployee(const erp::employee::po::CEmployeePo& oEmployee);

private:
		std::string m_strMachineKey;
        std::string m_strSource;
        uint32_t m_dwSceneId;
        uint32_t m_dwOperatorUin;

        static uint32_t s_dwPageSizeLimit;
        static std::bitset<32> s_bitsetValidPropertyBit;

        static CItilGroup s_oGetEmployee_Group;
        static CItilGroup s_oAddEmployee_Group;

SECTION_SELF_DEFINE_END

private:
	enum DeployMethod m_method;
};

}
}
}

#endif /* _EMPLOYEEAO_EMPLOYEE_H_ */
